package edu.psu.geovista.app.pcp.toolkits.colorpalette;

import edu.psu.geovista.app.pcp.toolkits.colorpalette.v1.DynamicSwatchPaneImpl;

import java.awt.*;
import java.util.Set;

/*
 * GeoVISTA Center (Penn State, Dept. of Geography)
 * Copyright (c), 2003-2011,  Jin Chen and Alan M. MacEachren, GeoVISTA Center, Penn State University
 * Licensed under Simplified BSD License

 * A Panel display a set of color swatches (JLabel). The swatch's size is NOT fixed, does change along with the change to the size of their container panel
   Note: recommend the container using BorderLayout()
 *
 *
 * @author: jin Chen
 * @date: Jan 15, 2005$
 * @version: 1.0
 */

public interface DynamicSwatchPane {
    int LAYOUT_TOP_BOTTOM=1;
    int LAYOUT_BOTTOM_TOP=2;
    Color COLOR_DEFAULT=Color.blue ;//for testing
    int GAP_WIDTH=5;
    int GAP_HEIGHT=5;

    public void setColors(Color[][] colors);

    public void setColors(Color[] colors);

    public void setGap(int hgap,int vgap);

    public void setSwatchBorderColor(Color c);

    /**
     * clear previous selection. Then select a new swatch
     * @param swatch
     */
    public  void selectSwatch(DynamicSwatchPaneImpl.Swatch swatch);

    /**
     * add new selected swatch
     * @param swatch
     */
    public   void tryAddSelection(DynamicSwatchPaneImpl.Swatch swatch);
    public  void deselectSwatch(DynamicSwatchPaneImpl.Swatch swatch);
    public  void tryAddSelection(Set<DynamicSwatchPaneImpl.Swatch> swatches);
    public  void clearSelection();
    public Set <DynamicSwatchPaneImpl.Swatch> getSelectedSwatches() ;
    //java.util.List getSwatches();
}
